<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <title>std.outbuffer</title>
  <link href="./css/style.css" rel="stylesheet" type="text/css"/>
  <!-- <link href="./img/icon.png" rel="icon" type="image/png"/> -->
  <script type="text/javascript" src="./js/jquery.js"></script>
  <script type="text/javascript" src="./js/modules.js"></script>
  <script type="text/javascript" src="./js/quicksearch.js"></script>
  <script type="text/javascript" src="./js/navigation.js"></script>
  <!--<script type="text/javascript" src="./js/jquery.treeview.js"></script>-->
  <script type="text/javascript">
    var g_moduleFQN = "std.outbuffer";
  </script>
  
</head>
<body>
<div id="content">
  <h1><a href="./htmlsrc/std.outbuffer.html" class="symbol">std.outbuffer</a></h1>
  
<p class="sec_header">Boilerplate:</p><!-- undefined macro in std/outbuffer.d -->
<dl>
<dt class="decl">class <a class="symbol _class" name="OutBuffer" href="./htmlsrc/std.outbuffer.html#L37" kind="class" beg="37" end="322">OutBuffer</a>; <a title="Permalink to this symbol" href="#OutBuffer" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L37">#</a></dt>
<dd class="ddef">
<div class="summary">OutBuffer provides a way to build up an array of bytes out
 of raw data. It is useful for things like preparing an
 array of bytes to write out to a file.
 OutBuffer's byte order is the format native to the computer.
 To control the byte order (endianness), use a class derived
 from OutBuffer.</div>
<dl>
<dt class="decl">ubyte data[] <a class="symbol _variable" name="OutBuffer.data" href="./htmlsrc/std.outbuffer.html#L39" kind="variable" beg="39" end="39">data</a>; <a title="Permalink to this symbol" href="#OutBuffer.data" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L39">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">uint <a class="symbol _variable" name="OutBuffer.offset" href="./htmlsrc/std.outbuffer.html#L40" kind="variable" beg="40" end="40">offset</a>; <a title="Permalink to this symbol" href="#OutBuffer.offset" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L40">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _invariant" name="OutBuffer.invariant" href="./htmlsrc/std.outbuffer.html#L42" kind="invariant" beg="42" end="46">invariant</a>; <a title="Permalink to this symbol" href="#OutBuffer.invariant" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L42">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl"><a class="symbol _ctor" name="OutBuffer.this" href="./htmlsrc/std.outbuffer.html#L48" kind="ctor" beg="48" end="51">this</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#OutBuffer.this" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L48">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">ubyte[] <a class="symbol _function" name="OutBuffer.toBytes" href="./htmlsrc/std.outbuffer.html#L57" kind="function" beg="57" end="57">toBytes</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#OutBuffer.toBytes" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L57">#</a></dt>
<dd class="ddef">
<div class="summary">Convert to array of bytes.</div></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.reserve" href="./htmlsrc/std.outbuffer.html#L68" kind="function" beg="68" end="85">reserve</a><span class="params">(uint <em>nbytes</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.reserve" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L68">#</a></dt>
<dd class="ddef">
<div class="summary">Preallocate nbytes more to the size of the internal buffer.</div>
This is a
 speed optimization, a good guess at the maximum size of the resulting
 buffer will improve performance by eliminating reallocations and copying.</dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.write" href="./htmlsrc/std.outbuffer.html#L91" kind="function" beg="91" end="96">write</a><span class="params">(const( ubyte)[] <em>bytes</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L91">#</a></dt>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:3" href="./htmlsrc/std.outbuffer.html#L105" kind="function" beg="105" end="105">write</a><span class="params">(byte <em>b</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:3" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L105">#</a></dt>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:4" href="./htmlsrc/std.outbuffer.html#L106" kind="function" beg="106" end="106">write</a><span class="params">(char <em>c</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L106">#</a></dt>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:6" href="./htmlsrc/std.outbuffer.html#L115" kind="function" beg="115" end="115">write</a><span class="params">(short <em>s</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:6" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L115">#</a></dt>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:9" href="./htmlsrc/std.outbuffer.html#L131" kind="function" beg="131" end="131">write</a><span class="params">(int <em>i</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:9" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L131">#</a></dt>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:11" href="./htmlsrc/std.outbuffer.html#L140" kind="function" beg="140" end="140">write</a><span class="params">(long <em>l</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:11" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L140">#</a></dt>
<dd class="ddef">
<div class="summary">Append data to the internal buffer.</div></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:2" href="./htmlsrc/std.outbuffer.html#L98" kind="function" beg="98" end="103">write</a><span class="params">(ubyte <em>b</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L98">#</a></dt>
<dd class="ddef"></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:5" href="./htmlsrc/std.outbuffer.html#L108" kind="function" beg="108" end="113">write</a><span class="params">(ushort <em>w</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:5" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L108">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:7" href="./htmlsrc/std.outbuffer.html#L117" kind="function" beg="117" end="122">write</a><span class="params">(wchar <em>c</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:7" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L117">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:8" href="./htmlsrc/std.outbuffer.html#L124" kind="function" beg="124" end="129">write</a><span class="params">(uint <em>w</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:8" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L124">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:10" href="./htmlsrc/std.outbuffer.html#L133" kind="function" beg="133" end="138">write</a><span class="params">(ulong <em>l</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:10" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L133">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:12" href="./htmlsrc/std.outbuffer.html#L142" kind="function" beg="142" end="147">write</a><span class="params">(float <em>f</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:12" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L142">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:13" href="./htmlsrc/std.outbuffer.html#L149" kind="function" beg="149" end="154">write</a><span class="params">(double <em>f</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:13" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L149">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:14" href="./htmlsrc/std.outbuffer.html#L156" kind="function" beg="156" end="161">write</a><span class="params">(real <em>f</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:14" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L156">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:15" href="./htmlsrc/std.outbuffer.html#L163" kind="function" beg="163" end="166">write</a><span class="params">(string <em>s</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:15" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L163">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.write:16" href="./htmlsrc/std.outbuffer.html#L168" kind="function" beg="168" end="171">write</a><span class="params">(OutBuffer <em>buf</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.write:16" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L168">#</a></dt>

<dt class="decl">void <a class="symbol _function" name="OutBuffer.fill0" href="./htmlsrc/std.outbuffer.html#L177" kind="function" beg="177" end="182">fill0</a><span class="params">(uint <em>nbytes</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.fill0" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L177">#</a></dt>
<dd class="ddef">
<div class="summary">Append nbytes of 0 to the internal buffer.</div></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.alignSize" href="./htmlsrc/std.outbuffer.html#L188" kind="function" beg="188" end="203">alignSize</a><span class="params">(uint <em>alignsize</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.alignSize" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L188">#</a></dt>
<dd class="ddef">
<div class="summary">0-fill to align on power of 2 boundary.</div></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.align2" href="./htmlsrc/std.outbuffer.html#L209" kind="function" beg="209" end="213">align2</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#OutBuffer.align2" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L209">#</a></dt>
<dd class="ddef">
<div class="summary">Optimize common special case alignSize(2)</div></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.align4" href="./htmlsrc/std.outbuffer.html#L219" kind="function" beg="219" end="225">align4</a><span class="params">()</span>; <a title="Permalink to this symbol" href="#OutBuffer.align4" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L219">#</a></dt>
<dd class="ddef">
<div class="summary">Optimize common special case alignSize(4)</div></dd>
<dt class="decl">string <a class="symbol _function" name="OutBuffer.toString" href="./htmlsrc/std.outbuffer.html#L231" kind="function" beg="231" end="235">toString</a><span class="params">()</span>; <span class="attrs">[<span class="stc">override</span>]</span> <a title="Permalink to this symbol" href="#OutBuffer.toString" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L231">#</a></dt>
<dd class="ddef">
<div class="summary">Convert internal buffer to array of chars.</div></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.vprintf" href="./htmlsrc/std.outbuffer.html#L241" kind="function" beg="241" end="286">vprintf</a><span class="params">(string <em>format</em>, va_list <em>args</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.vprintf" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L241">#</a></dt>
<dd class="ddef">
<div class="summary">Append output of C's vprintf() to internal buffer.</div></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.printf" href="./htmlsrc/std.outbuffer.html#L292" kind="function" beg="292" end="298">printf</a><span class="params">(string <em>format</em>, ...)</span>; <a title="Permalink to this symbol" href="#OutBuffer.printf" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L292">#</a></dt>
<dd class="ddef">
<div class="summary">Append output of C's printf() to internal buffer.</div></dd>
<dt class="decl">void <a class="symbol _function" name="OutBuffer.spread" href="./htmlsrc/std.outbuffer.html#L305" kind="function" beg="305" end="321">spread</a><span class="params">(uint <em>index</em>, uint <em>nbytes</em>)</span>; <a title="Permalink to this symbol" href="#OutBuffer.spread" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L305">#</a></dt>
<dd class="ddef">
<div class="summary">At offset index into buffer, create nbytes of space by shifting upwards
 all data past index.</div></dd></dl></dd>
<dt class="decl"><a class="symbol _unittest" name="unittest" href="./htmlsrc/std.outbuffer.html#L324" kind="unittest" beg="324" end="339">unittest</a>; <a title="Permalink to this symbol" href="#unittest" class="symlink">¶</a><a title="Go to the HTML source file" class="srclink" href="./htmlsrc/std.outbuffer.html#L324">#</a></dt>
<dd class="ddef"></dd></dl>
</div>
<div id="footer">
  <p>Copyright (c) 2001-2005 by Digital Mars
        All Rights Reserved
        www.digitalmars.com</p>
  <p>Page generated by <a href="http://code.google.com/p/dil">dil</a> on Sun Dec 28 04:26:42 2008. Rendered by <a href="http://code.google.com/p/dil/wiki/Kandil">kandil</a>.</p>
</div>
</body>
</html>